﻿package mortal.game.scene3D.layer3D
{
    import flash.utils.*;
    import mortal.game.scene3D.layer3D.utils.*;

    public class PixsMaskDictionary extends Object
    {
        private var _map:Dictionary;

        public function PixsMaskDictionary(param1:Boolean = false)
        {
            this._map = new Dictionary(param1);
            return;
        }// end function

        public function addMask(param1:int, param2:int, param3:PixsMask) : PixsMask
        {
            this._map[param1 * 10000 + param2] = param3;
            return param3;
        }// end function

        public function removeMask(param1:int, param2:int) : PixsMask
        {
            var _loc_3:* = param1 * 10000 + param2;
            var _loc_4:* = this._map[_loc_3];
            if (_loc_4)
            {
                delete this._map[_loc_3];
            }
            return _loc_4;
        }// end function

        public function getMask(param1:int, param2:int) : PixsMask
        {
            return this._map[param1 * 10000 + param2];
        }// end function

        public function hasMask(param1:int, param2:int) : Boolean
        {
            return param1 * 10000 + param2 in this._map;
        }// end function

        public function removeAll() : void
        {
            var _loc_1:PixsMask = null;
            for each (_loc_1 in this._map)
            {
                
                if (_loc_1)
                {
                    _loc_1.dispose();
                }
            }
            this._map = new Dictionary();
            return;
        }// end function

    }
}
